<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

</head>
<body>
    <div>
    <img src="images/0.png" alt="">
    <img src="images/0.png" alt="">
    <img src="images/0.png" alt="">
    <img src="images/0.png" alt="">
    <img src="images/0.png" alt="">
    <img src="images/0.png" alt="">
    </div>
    <script>
    showTime();  
    setInterval(showTime,1000)
    function showTime(){
        var oDate=new Date();
    var hour=oDate.getHours();
    var minute=oDate.getMinutes();
    var second=oDate.getSeconds();
    var img=document.getElementsByTagName("img");
  
    function transform(value){
        if(value<10){
            return "0"+value;
        }else{
            return ""+value;
        }
    }
    var allTime=transform(hour) + transform(minute) + transform(second);
    console.log(allTime)
    for(var i=0;i<allTime.length;i++){
        img[i].src="images/"+ allTime.charAt(i)+".png";
    }
    }
    // console.log(transform(second));
        </script>
</body>
</html>